
// 获取最新动态
export const GetNewsList = () => uni.$http.get('/api/news')
// 根据关键字搜索动态
export const GetNewsListByKeywords = (keywords) => uni.$http.get('/api/news/keywords',{keywords})
// 根据id获取动态详情
export const GetNewsDetailById = (id) => uni.$http.get('/api/news/'+id)


// 获取家政员列表
export const GetHomeHelperList = () => uni.$http.get('/api/homehelper')

// 根据关键字搜索预约
export const GetPreOrderListByKeywords = (keywords) => uni.$http.get('/api/preorder/keywords',{keywords})

// 获取预约详情
export const GetPreOrderDetail = (id) => uni.$http.get('/api/preorder/detail/'+id)

// 获取用户详情
export const GetUserinfo = (id) => uni.$http.get('/api/userinfo/'+id)

// 获取我的预约
export const GetOrderList = (id) => uni.$http.get('/api/orderList/'+id)

// 根据关键字搜索
export const GetOrderListByKeywords = (keywords) => uni.$http.get('/api/orderList/keywords',{keywords})


// 取消预约
export const CacelPreOrder = (id,data) => uni.$http.put('/api/preorder/update/'+id,data)


// 通过用户手机号查询信息
export const FindByTelphone = (phone) => uni.$http.get('/api/preorder/phone/'+phone)
// 核销
export const CheckoutCode = (phone) => uni.$http.put('/api/preorder/phone',phone)

// 提交预约
export const SubmitOrder = (data) => uni.$http.post('/api/order/add',data)


// 通过用日期查询预约信息
export const GetPreorderDate = (date) => uni.$http.get('/api/preorder/date',date)

// 登录
export const Login = (data) => uni.$http.post('/apis/login',data)
// 注册
export const Register = (data) => uni.$http.post('/apis/register',data)

export const AddHelper = (data) => uni.$http.post('/api/helper/add',data)


export const GetOrderListById = (id) => uni.$http.get('/api/order/list/'+id)

// 修改家政员状态
export const EditHelperState = (data) => uni.$http.put('/api/helper/update/status',data)


// 删除家政员
export const DelHelper = (id) => uni.$http.delete('/api/helper/del/'+id)

// 置顶排序
export const UptoTop = (id,data) => uni.$http.put('/api/helper/top/'+id,data)

// 首页推荐
export const ToRecommend = (id,data) => uni.$http.put('/api/helper/recommend/'+id,data)

// 根据关键字查询家政员
export const GetHelperByKeywords = (data) => uni.$http.get('/api/helper/keywords',data)


// 查询家政员排序号
export const GetOrderNum = () => uni.$http.get('/api/helper/ordernum')



// 动态
export const AddNews = (data) => uni.$http.post('/api/news/add',data)


// 删除家政员
export const DelNews = (id) => uni.$http.delete('/api/news/del/'+id)
// 置顶排序
export const UptoTops = (id,data) => uni.$http.put('/api/news/top/'+id,data)

// 首页推荐
export const ToRecommends = (id,data) => uni.$http.put('/api/news/recommend/'+id,data)
// 修改动态状态
export const EditNewsState = (data) => uni.$http.put('/api/news/update/status',data)
// 查询动态排序号
export const GetNewsOrderNum = () => uni.$http.get('/api/news/ordernum')



// 分段预约名单


export const CancelCheck =(id,data)=> uni.$http.put('/api/order/update/status/'+id,data)

// 删除
export const DelItemById = (id)=> uni.$http.delete('/api/order/delete/'+id)

// 取消所有预约
export const CancelAll = ()=> uni.$http.put('/api/order/cancel/all')


// 家政员登录
export const LoginHelper = (data) => uni.$http.post('/apis/helper/login',data)

// 修改登录密码
export const EditPasswordHelper = (data) => uni.$http.post('/apis/helper/update/pwd',data)


// 获取关于
export const GetAbout = () => uni.$http.get('/apis/about')
// 修改关于
export const EditAbout = (data) => uni.$http.put('/apis/about/update',data)

// 修改管理员登录密码
export const EditPasswordAdmin = (data) => uni.$http.put('/api/admin/update/pwd',data)

// 获取管理员列表
export const GetAdminList = (type) => uni.$http.get(`/api/admin/${type}/list`)
export const DelAdmin = (id,type) => uni.$http.delete(`/api/admin/${type}/del/${id}`)


export const GetUserinfoAdmin = (id) => uni.$http.get('/api/admin/detail/'+id)
// 修改信息
export const UpdateUserinfoAdmin = (id,data) => uni.$http.put('/api/admin/update/info/'+id,data)


// 获取服务介绍
export const GetService = () => uni.$http.get('/apis/service')


// 添加收藏
export const AddMyFav = (data) => uni.$http.post('/api/my/like',data)
// 查询收藏状态
export const GetFavStatus = (id) => uni.$http.get('/api/my/like/'+id)
// 查询收藏列表
export const GetFavList = (id) => uni.$http.get('/api/my/like/list/'+id)
// 查询浏览记录
export const GetLookList = (id) => uni.$http.get('/api/my/look/list/'+id)
// 添加记录
export const AddMyLog = (data) => uni.$http.post('/api/my/log/add',data)